package com.shg.web.ztest;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.shg.web.tools.FreeMarkerTool;


public class ClientTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		List<User> list=new ArrayList<User>();
		User user = new User();
		user.setUserName("张三");
		user.setUserPassword("123");
		list.add(user);
		user = new User();
		user.setUserName("李四");
		user.setUserPassword("123");
		list.add(user);

		Map<String, Object> root = new HashMap<String, Object>();
		root.put("list", list);
		String templatesPath = "ftl";
		File file=new File(templatesPath);
		if(!file.exists()){
			file.mkdirs();
		}
		String templateFile = "/user.ftl";
		String htmlFile =  "/user.html";
		FreeMarkerTool.analysisTemplate(templatesPath, templateFile,templatesPath, htmlFile,root);
	}

}
